﻿namespace Sgr.BillNumbering.Services
{
    public interface ICodeGenerator
    {
        /// <summary>
        /// 异步生成编码
        /// <param name="ruleName">编码名称</param>
        /// <param name="customPrefix">自定义前缀</param>
        /// <param name="cancellationToken">取消令牌</param>
        /// </summary>
        Task<string> GenerateAsync(string ruleName, string customPrefix = "", CancellationToken cancellationToken = default);
    }
}